package com.cn.wanxi.service;

import com.cn.wanxi.dao.CompanyDao;
import com.cn.wanxi.io.CompanyIO;
import com.cn.wanxi.model.CompanyModel;

/**
 * 业务逻辑层
 * 封装代码，封装对象
 */
public class CompanyService {
    public CompanyModel getCompanyModel() {
        CompanyModel companyModel = new CompanyModel();
        /**
         *
         * 属于来源于文件记事本
         * 1.创建记事本
         * 2.将数据保存到记事本
         * 3.读取记事本内容
         * 4.将数据封装到CompanyModel
         */
        CompanyIO companyIO = new CompanyIO();
//        companyIO.create();//创建
//        companyIO.save();//保存
//        companyIO.read();//读取
        companyModel = companyIO.getModel();//封装
        return companyModel;
    }

    public static void main(String[] args) {
        new CompanyService().getCompanyModel();
    }

}
